home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 27 / CU Amiga Magazine's Super CD-ROM 27 (1998)(EMAP Images)(GB)[!][issue 1998-10].iso / CUCD / PowerPC / vbcc / machines / amigawos / doc / ppcmathlib.doc < prev    next >
Text File  |  1998-08-02  |  2KB  |  66 lines

  1. Math functions for StormC PPC
  2. =============================
  3.  
  4.  
  5. Introduction
  6. ------------
  7.  
  8. This is a PowerPC link lib which replaces some built math functions of the
  9. StormC compiler with the math library from Motorola (libmoto).
  10. It replaces acos, atan, atan2, sqrt, pow, exp, sin and cos with functions
  11. which are 1.5 to 9 times faster than original functions.
  12.  
  13.  
  14. Usage
  15. -----
  16.  
  17. Simply add the lib to your StormC project.
  18.  
  19.  
  20. Speed
  21. -----
  22.  
  23. all values on Cyberstorm PPC 604e/150 060/50, lower values are better
  24.  
  25.                     acos  atan  atan2 sqrt   pow   exp   sin   cos   log  log10   overall
  26. ------------------------------------------------------------------------------------
  27. PPC fast         26    36    48    44    52    27    34    34    37    38      376  100%
  28. PPC original     48   104   195   410   203    42   274   272   109   112     1769  376%
  29. 68k             135   253   294    90   840   565   362   359   267   313     3478  925%
  30.  
  31.  
  32. Special functions
  33. -----------------
  34.  
  35. There are also two functions which use the fast special instructions of
  36. the 604e.
  37.  
  38. estinvsqrt calculates the estimate of the reciprocal of the square root of the
  39. operand. The estimate is correct to a precision of one part in 32.
  40.  
  41. estinv calculates the estimate of the reciprocal of the operand. The estimate
  42. is correct to a precision of one part in 256.
  43.  
  44. The prototypes for this functions are:
  45.  
  46. double estinvsqrt(double a);
  47. double estinv(double a);
  48.  
  49.  
  50. History
  51. -------
  52.  
  53. 1.0 (07/16/98)    first public release
  54.  
  55. Problems
  56. --------
  57.  
  58. Currently errno is not set if the functions are called with invalid parameters.
  59.  
  60.  
  61.  
  62. Have fun!
  63.  
  64. Andreas Heumann
  65. andreash@diamondmm.com
  66.